+2007-06-16 Richard Hult <richard@imendio.com>
+
+ * gdk/quartz/gdkevents-quartz.c: (find_window_for_ns_event),
+ (gdk_event_translate): Remove pointless logging for unhandled events.
+ Activate the application on non-left clicks, since that is only done
+ for left clicks and we depend on it to get events routed properly for
+ context menus and other popup windows.
+
2006-09-22 Dennis Cranston <dennis_cranston@yahoo.com>
* gtk/gtkfilechooserbutton.c: (change_icon_theme),
}
break;
- case NSAppKitDefined:
- case NSSystemDefined:
- /* We ignore these events */
- break;
-
default:
- NSLog(@"Unhandled event %@", nsevent);
+ /* Ignore everything else. */
+ break;
}
return NULL;
if (result == GDK_FILTER_REMOVE)
return TRUE;
+ /* We need the appliction to be activated on clicks so that popups
+ * like context menus get events routed properly. This is handled
+ * automatically for left mouse button presses but not other
+ * buttons, so we do it here.
+ */
+ if ([nsevent type] == NSRightMouseDown || [nsevent type] == NSOtherMouseDown)
+ {
+ if (![NSApp isActive])
+ [NSApp activateIgnoringOtherApps:YES];
+ }
+
current_mask = get_event_mask_from_ns_event (nsevent);
switch ([nsevent type])
dx--;
}
- break;
}
+ break;
+
case NSKeyDown:
case NSKeyUp:
case NSFlagsChanged:
return TRUE;
}
break;
+
default:
- NSLog(@"Untranslated: %@", nsevent);
+ /* Ignore everything elsee. */
+ break;
}
return FALSE;